<!DOCTYPE html>
<html>
  <head>

    <meta charset="UTF-8">

    <style>
      body{
        background-color: #e2d4d4;
      }
      main{
        background-color: #e5e2e2;
        background-size: 40vw;
        width: 20rem;
        height: 18rem;
        margin: auto;
        margin-top:20vh;
        text-align: center;

      }
    </style>

    <script type="text/javascript" src=".\assets\lib\JQuery.txt.js"></script>
<!--    <script type="text/javascript" src="index.js?da2d77692f92dc8bc168"></script>-->



    <script>
      window.onload=()=>{ //让网页加载完后,再执行回调函数
        document.querySelector('#loginBtn').onclick=()=>{ //点击登录按钮进行操作
          let username=document.querySelector('#username').value //获取用户名
          let password=document.querySelector('#password').value //获取密码
          $.ajax({
            type:'POST',
            // url:'/api/mgr/signin',
            url:'http://127.0.0.1/mgr/signin/',
            data:{
              username:username,
              password:password,
            }
          })
          // $.post(
          //         '/api/mgr/signin',
          //         {
          //           username:username,
          //           password:password,
          //         }
          // )
        }
      }
    </script>
  </head>

  <body>

    <main>
      <pre>
        <div style="display: flex;justify-content: center">
        <br><img src=".\assets\images\logo.png"
                 alt="无法显示图片"
                 style="border-radius: 50%;width: 2.5rem;height: 2.5rem;margin-right: 0.3rem" >
        <span style="font-size: 2rem">黑羽医疗</span><br></div>
        <br><span >输入用户名密码登录</span>
        <br><input type="text" placeholder="用户名" id="username"><br>
        <br><input type="password" placeholder="密码" id="password"><br>
        <br><button id="loginBtn">登录</button>
        <br><a href="/register.html">没有账号?请先注册</a>
      </pre>
    </main>



  </body>
</html>